home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PCGUIA 10
/
PC Guia 10.iso
/
database
/
shared.dir
/
01011_Script_1011
< prev
next >
Wrap
Text File
|
1996-03-14
|
3KB
|
115 lines
on GetPeople
global mpath
-- get the list of names that have ".TXT"
set ftype = "txt"
-- get the list of files in the current folder
put [] into fileList
repeat with i = 1 to the maxInteger
put getNthFileNameInFolder(mpath, i) ¼
into n
if n = EMPTY then exit repeat
set the itemdelimiter = "."
if item 2 of n = ftype then
if the number of chars of n > 4 or ¼
(the number of chars of n = 4 and char 1 to 2 of n <> "CU" ¼
and char 1 to 2 of n <> "SC") then
append(fileList, item 1 of n)
end if
end if
set the itemdelimiter = ","
end repeat
-- put fileList
set num = count(filelist)
set txtfilelist = []
-- put filenames in the makerfilename list
repeat with i = 1 to num
set tmp = getat(filelist,i)
set tmpnum = bsearch(tmp,"MakerList")
if tmpnum > 0 then
put tmp into item 3 of line tmpnum of field "MakerFileNames"
else
put "problem with: " && tmp
end if
end repeat
if 1 then
set the text of field "Filenames" = " "
set the text of field "Filenames2" = " "
if num > 25 then
repeat with i = 1 to 25
set tmp = getat(filelist,i)
put item 1 of tmp into line (the number of lines of field "filenames") + 1 of¼
field "Filenames"
end repeat
repeat with i = 26 to num
set tmp = getat(filelist,i)
put item 1 of tmp into line (the number of lines of field "filenames2") + 1 of¼
field "Filenames2"
end repeat
else
repeat with i = 1 to num
set tmp = getat(filelist,i)
put item 1 of tmp into line (the number of lines of field "filenames") + 1 of¼
field "Filenames"
end repeat
end if
end if
end
on DoIndex
global mPath
-- get the list of files in the current folder
put [] into fileList
repeat with i = 1 to the maxInteger
put getNthFileNameInFolder(mpath, i) ¼
into n
if n = EMPTY then exit repeat
append(fileList, n)
end repeat
-- put fileList
-- get the list of names that have ".TXT"
set num = count(filelist)
set txtfilelist = []
repeat with i = 1 to num
set tmp = getat(filelist,i)
set the itemdelimiter = "."
if item 2 of tmp = "TXT" then
add(txtfilelist,tmp)
end if
set the itemdelimiter = ","
end repeat
put txtfilelist
set num = count(txtfilelist)
repeat with i = 1 to num
makeindex (getat(txtfilelist,i))
end repeat
end